#ifndef __FR_DEVICE_CHARGE__
#define __FR_DEVICE_CHARGE__

#ifdef __cplusplus
extern "C" {
#endif

#include "fr30xx.h" 
#include "app_task.h"

#define read_analog_status()    ool_read(PMU_REG_ANA_STATUS)	

typedef enum 
{
    CHARGING_IDLE = 0,
    CHARGING_IN,
    CHARGING_OUT,
    CHARGING_FULL,
    CHARGING_NOT_FULL,
}enum_charge_type_t;



extern void device_charge_init(void);
extern void charge_vbat_toggle_detected(uint8_t sat);
extern void charge_event_handle(uint8_t param);
extern uint8_t get_charge_status(void);

#ifdef __cplusplus
}
#endif

#endif /* __FR_DEVICE_CHARGE__ */
